//
//  SelectTimeCell.m
//  Doctor
//
//  Created by 阳光 on 16/10/19.
//  Copyright © 2016年 阳光. All rights reserved.
//

#import "SelectTimeCell.h"

@interface SelectTimeCell ()

//@property(nonatomic,strong)UILabel *leftLabel;
//
//@property(nonatomic,strong)UILabel *rightLabel;

@end

@implementation SelectTimeCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        self.backgroundColor=WhiteColor;
        
        self.leftLabel.font=Font_Number(16);
        
        self.rightLabel.font=Font_Number(16);

    }
    return self;
}

// leftLabel
-(UILabel *)leftLabel
{
    if (!_leftLabel) {
        _leftLabel=[self getLabelWithText:@"9:30 -- 10:00" font:Font_Number(16) textColor:WhiteColor textAlignment:NSTextAlignmentCenter lineBreakMode:NSLineBreakByCharWrapping numberOfLines:1];
        [self.contentView addSubview:_leftLabel];
        _leftLabel.backgroundColor=Main_Color;
        [_leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.mas_equalTo(kmargin);
            make.size.mas_equalTo(CGSizeMake((APPW-kmargin*4)/2,30));
        }];
    }
    return _leftLabel;
}

// enameLabel
-(UILabel *)rightLabel
{
    if (!_rightLabel) {
        _rightLabel=[self getLabelWithText:@"9:30 -- 10:00" font:Font_Number(16) textColor:WhiteColor textAlignment:NSTextAlignmentCenter lineBreakMode:NSLineBreakByCharWrapping numberOfLines:1];
        [self.contentView addSubview:_rightLabel];
        _rightLabel.backgroundColor=Main_Color;
        [_rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.leftLabel.mas_right).offset(kmargin);
            make.centerY.mas_equalTo(self.leftLabel.mas_centerY);
            make.size.mas_equalTo(CGSizeMake((APPW-kmargin*4)/2,30));
        }];
    }
    return _rightLabel;
}

@end
